﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current">
        <header class="bar student-bar bar-black">
          <a href="${ctx.host}" class="icon icon-left pull-left back"></a>
          <h1 class="student-title">我的课时</h1>
        </header>
        <div class="content" style="margin-top: 2.2rem;">
          <div class="hour-banner">
            <div class="row">
              <div class="col-100 text-center">
                <span class="word">本月课时</span><br>
                <span class="amount">
                    ${statistics[0].currentMonth ? (empty experiences[statistics[0].month] ? statistics[0].hour : (statistics[0].hour - experiences[statistics[0].month])) : 0}
                </span>
              </div>
            </div>
          </div>          
          <!-- end hour banner -->
          
          <div class="list-block hour-list no-margin">
            <a href="${ctx.host }/hours/${statistics[0].id}" class="item-content item-link">
              <div class="item-inner">
                <div class="item-title">${statistics[0].month}（&nbsp;总计${empty experiences[statistics[0].month] ? statistics[0].hour : (statistics[0].hour - experiences[statistics[0].month])}课时&nbsp;）</div>
              </div>
            </a>
            <c:forEach var="statistic" items="${statistics}" begin="1">
              <a href="${ctx.host }/hours/${statistic.id}" class="item-content item-link">
                <div class="item-inner">
                  <div class="item-title">${statistic.month}（&nbsp;总计${empty experiences[statistic.month] ? statistic.hour : (statistic.hour - experiences[statistic.month])}课时&nbsp;）</div>
                </div>
              </a>
            </c:forEach>
          </div>
          <!-- end hour list -->
          
        </div>
        
      </div>
    </div>
    
    <%@ include file="/WEB-INF/include/script.jsp"%>
    
  </body>
</html>